import { request } from "@ruifox-cms/utils";

//获取总组织结构
export function orgStructure(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/org/orgStructure",
    method: "get",
    params,
  });
}
// 新增节点
export function createOrg(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/org/create",
    method: "post",
    data,
  });
}
//更新节点
export function updateByIdOrg(data) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/org/updateById",
    method: "post",
    data,
  });
}

//删除节点
export function deleteByIdOrg(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/org/deleteById",
    method: "post",
    params,
  });
}

//批量删除节点
export function deleteByIdsOrg(params) {
  return request({
    baseURL: "/10101_api",
    url: "/oltes/api/v1/org/deleteByIds",
    method: "post",
    params,
  });
}
